<?php

$installer = $this;

$installer->startSetup();
$installer = new Mage_Catalog_Model_Resource_Eav_Mysql4_Setup('core_setup');

    $installer->addAttribute('catalog_product', 'tour', array(
        'type'              => 'varchar',
        'backend'           => '',
        'frontend'          => '',
        'label'             => 'Tour',
        'input'             => 'text',
        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible'           => true,
        'required'          => false,
        'user_defined'      => false,
        'searchable'        => false,
        'filterable'        => false,
        'comparable'        => false,
        'visible_on_front'  => false,
        'unique'            => false,
        )
    );
    $installer->addAttribute('catalog_product', 'brochure', array(
        'type'              => 'varchar',
        'backend'           => '',
        'frontend'          => '',
        'label'             => 'Brochure',
        'input'             => 'text',
        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible'           => true,
        'required'          => false,
        'user_defined'      => false,
        'searchable'        => false,
        'filterable'        => false,
        'comparable'        => false,
        'visible_on_front'  => false,
        'unique'            => false,
        )
    );
    $installer->addAttribute('catalog_product', 'rebate', array(
        'type'              => 'varchar',
        'backend'           => '',
        'frontend'          => '',
        'label'             => 'Rebate',
        'input'             => 'text',
        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible'           => true,
        'required'          => false,
        'user_defined'      => false,
        'searchable'        => false,
        'filterable'        => false,
        'comparable'        => false,
        'visible_on_front'  => false,
        'unique'            => false,
        )
    );
    
    $installer->addAttribute('catalog_product', 'msds', array(
        'type'              => 'varchar',
        'backend'           => '',
        'frontend'          => '',
        'label'             => 'MSDS',
        'input'             => 'text',
        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible'           => true,
        'required'          => false,
        'user_defined'      => false,
        'searchable'        => false,
        'filterable'        => false,
        'comparable'        => false,
        'visible_on_front'  => false,
        'unique'            => false,
        )
    );
$installer->run("
                DROP TABLE IF EXISTS {$this->getTable('temp_additionaldata')};
				CREATE TABLE IF NOT EXISTS {$this->getTable('temp_additionaldata')}(
				    `id` int(10) NOT NULL AUTO_INCREMENT,
				    `product_id` int(10),
				    `sku` varchar(25),
				    `status` int(1) NOT NULL DEFAULT '0',
				    `content` text,
				     PRIMARY KEY (`id`),
				    KEY `sku` (`sku`,`status`)
				 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
            ");


$installer->endSetup(); 